<?php
    $sql = "SELECT cd_value FROM course_data WHERE cd_id=2";
    $resultMsg1 = $db->Execute($sql);
    $resultMsg1->Close();
?>
<script type="text/javascript">
    $(function() {
        $("#tabs").tabs();
    });
    
    $(document).ready(function(){
        $('.submitMsgBt').click(function(){
            $("#msg_success_msg").css('display','none');
            $("#msg_error_msg").css('display','none');
            $('.msg_submit_indicator').css('display','inline');
            $('#courseMsgFrm').attr('method','post');
            $('#courseMsgFrm').attr('target','ajaxIfrm');
            $('#courseMsgFrm').submit();
        });
    });
</script>

<h3 class="pageTitle">จัดการคอร์ส ภาษาสเปนธุรกิจ</h3>

<div id="tabs" class="courseEdit">
    
    <ul>
        <li id="car_"><a href="#tabs-1" title="Add files">Message</a></li>
    </ul>
    <div id="tabs-1" class="courseMsgFrm">
        <form name="courseMsgFrm" id="courseMsgFrm" action="function/course4.php">
            <p class="boxTitle">message</p>
            <input type="text" name="editor1" value="<?php echo $resultMsg1->fields['cd_value']; ?>" class="input large" />
            <input type="button" class="button submitMsgBt" value="Save" />
            &nbsp;<img src="images/ajax-loader.gif" class="ajax_load_img msg_submit_indicator"/>
        </form>
        <div class="information canhide png_bg ajax_msg"></div>
        <div class="fail canhide png_bg ajax_msg" id="msg_error_msg"></div>
        <div class="success canhide ajax_msg" id="msg_success_msg"><p></p></div>
    </div>
    
    <iframe name="ajaxIfrm" class="ajaxIfrm" ></iframe>
</div>